From: Jo-Philipp Wich Date: Tue, 7 Nov 2023 20:59:25 +0000 (+0100) Subject: luci-app-opkg: fix sorting by size column X-Git-Url: http://git.openwrt.org/%22https:/collectd.org//%22/%22https:/collectd.org/%22?a=commitdiff_plain;h=769b30c7e0486135de779bc05fa1adbb7262de2f;p=project%2Fluci.git luci-app-opkg: fix sorting by size column Fixes: #6120 Signed-off-by: Jo-Philipp Wich (cherry picked from commit 63e5d38db02fa18dd471e974d1410a454e0aa086) --- diff --git a/applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js b/applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js index d4d5b8b88b..af1e972efc 100644 --- a/applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js +++ b/applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js @@ -310,8 +310,9 @@ function display(pattern) currentDisplayRows.push([ name, ver, - pkg.size ? '%1024mB'.format(pkg.size) - : (altsize ? '~%1024mB'.format(altsize) : '-'), + [ pkg.size || 0, + pkg.size ? '%1024mB'.format(pkg.size) + : (altsize ? '~%1024mB'.format(altsize) : '-') ], desc, btn ]);